<template lang="">
    <div>
        <button @click ="clickHandler">Call Father</button>
    </div>
</template>
<script>
export default {
    data(){
        return{
            subject:"网站开发技术",
            score:86
        };
    },
    methods: {
        clickHandler(){
            // 使用$emit事件score给父组件，传递科目名称和分数
            this.$emit('score',this.subject,this.score);
        }
    },
}
</script>
<style lang="">
    
</style>